package com.newgrand.controller;

import com.newgrand.domain.model.I8ReturnModel;
import com.newgrand.service.MonthlyValuationsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @创建人：ZhaoFengjie
 * @修改人：ZhaoFengjie
 * @创建时间：17:54 2022/10/17
 * @修改时间:：17:54 2022/10/17
 */
@Api(tags = "月度计价")
@RequestMapping("/MonthlyValuations")
@RestController
public class MonthlyValuationsController {

    @Resource
    private MonthlyValuationsService monthlyValuationsService;

    @ApiOperation(value = "月度计价数据获取接口", notes = "月度计价数据获取接口", produces = "application/json")
    @RequestMapping(value = "/GetDataByOrgId", method = RequestMethod.GET)
    I8ReturnModel getDataByOrgId(String orgId, String subcontractId) {
        return monthlyValuationsService.getDataByOrgId(orgId, subcontractId);
    }

    @ApiOperation(value = "月度计价数据保存接口", notes = "月度计价数据保存接口", produces = "application/json")
    @RequestMapping(value = "/SaveDataByOrgId", method = RequestMethod.GET)
    I8ReturnModel saveDataByOrgId(String orgId, String subcontractId) {
        return monthlyValuationsService.saveDataByOrgId(orgId, subcontractId);
    }

    @ApiOperation(value = "月度计价数据保存接口", notes = "月度计价数据保存接口", produces = "application/json")
    @RequestMapping(value = "/SaveDataByOrgId/All", method = RequestMethod.GET)
    I8ReturnModel saveDataByOrgIdAll(String orgId) {
        return monthlyValuationsService.saveDataByOrgIdAll(orgId);
    }
}
